Class SimulationImpl

java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.system.impl.SimulationImpl
All Implemented Interfaces:
IPCObject, Simulation

public class SimulationImpl extends IPCObjectImpl implements Simulation
Information provided by the PKI file:

    \class Simulation
    
    \brief Simulation holds the traffic details like PDUs, ports, etc.
    
    \example simulation()
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • getFrameInstanceCount

      public int getFrameInstanceCount()
      Information provided by the PKI file:
      
          \brief Returns the number of FrameInstances at present in the simulation.
          
          \return int, the number of FrameInstances at present in the simulation.
          
              
      Specified by:
      getFrameInstanceCount in interface Simulation
      Returns:
      int Returns a int
    • getFrameInstanceAt

      public FrameInstance getFrameInstanceAt(int nodeIndex)
      Information provided by the PKI file:
      
          \brief Returns the FrameInstance at the specified index in the simulation event list.
          
          \param nodeIndex, the index of FrameInstance of interest.
          
          \return FrameInstance, the FrameInstance object at the specified index in the simulation event list.
          
              
      Specified by:
      getFrameInstanceAt in interface Simulation
      Parameters:
      nodeIndex - Takes in a parameter of nodeIndex
      Returns:
      FrameInstance Returns a FrameInstance
    • getCurrentFrameInstanceIndex

      public int getCurrentFrameInstanceIndex()
      Information provided by the PKI file:
      
          \brief Returns index of "current" frame instance.
          
              
      Specified by:
      getCurrentFrameInstanceIndex in interface Simulation
      Returns:
      int Returns a int
    • resetSimulation

      public void resetSimulation()
      Information provided by the PKI file:
      
          \brief Resets simulation and fires the event.
          
              
      Specified by:
      resetSimulation in interface Simulation
    • isSimulationMode

      public boolean isSimulationMode()
      Information provided by the PKI file:
      
          \brief Returns true if in Simulation Mode, otherwise false.
          
          \return bool, true if in Simulation Mode, otherwise false.
          
              
      Specified by:
      isSimulationMode in interface Simulation
      Returns:
      boolean Returns a boolean
    • createTimer

      public SimulationTimer createTimer(int delay, boolean bAddRandom)
      Information provided by the PKI file:
      
          \brief Create Simulation Timer
          
          \param delay, delay time before timer expires
          
          \param bAddRandom, true to set the timer to expire at random time and false to not including the random factor
          
          \return SimulationTimer, SimulationTimer object
          
              
      Specified by:
      createTimer in interface Simulation
      Parameters:
      delay - Takes in a parameter of delay
      bAddRandom - Takes in a parameter of bAddRandom
      Returns:
      SimulationTimer Returns a SimulationTimer
    • createTimerUuid

      public UUID createTimerUuid(int delay, boolean bAddRandom)
      Information provided by the PKI file:
      
          \brief Create Simulation Timer and return the uuid of the timer object
          
          \param delay, delay time before timer expires
          
          \param bAddRandom, true to set the timer to expire at random time and false to not including the random factor
          
          \return uuid, SimulationTimer object's uuid
          
              
      Specified by:
      createTimerUuid in interface Simulation
      Parameters:
      delay - Takes in a parameter of delay
      bAddRandom - Takes in a parameter of bAddRandom
      Returns:
      UUID Returns a UUID
    • getIpcTimer

      public SimulationTimer getIpcTimer(UUID uuid)
      Information provided by the PKI file:
      
          \brief Get Simulation Timer based on uuid
          
          \param uuid, uuid of the timer
          
          \return SimulationTimer, SimulationTimer object
          
              
      Specified by:
      getIpcTimer in interface Simulation
      Parameters:
      uuid - Takes in a parameter of uuid
      Returns:
      SimulationTimer Returns a SimulationTimer
    • getCurrentSimTime

      public long getCurrentSimTime()
      Information provided by the PKI file:
      
          \brief Get Current Simulation Time
          
          \return long, Current Simulation Time
          
              
      Specified by:
      getCurrentSimTime in interface Simulation
      Returns:
      long Returns a long
    • setSimulationMode

      public void setSimulationMode(boolean toSimMode)
      Information provided by the PKI file:
      
          \brief Sets the mode to simulation mode
          \arg toSimMode, whether to change to simulation mode or not (realtime).
          
              
      Specified by:
      setSimulationMode in interface Simulation
      Parameters:
      toSimMode - Takes in a parameter of toSimMode
    • forward

      public void forward()
      Information provided by the PKI file:
      
          \brief Forwards the simulation by 1 step
          
              
      Specified by:
      forward in interface Simulation
    • backward

      public void backward()
      Information provided by the PKI file:
      
          \brief Backs the simulation by 1 step
          
              
      Specified by:
      backward in interface Simulation